﻿using Microsoft.Extensions.Configuration;

namespace MiniFox.Web.Configurations
{
    /// <summary>
    /// 
    /// </summary>
    public sealed class RouteSetting
    {        
        /// <summary>
        /// 唯一标识
        /// </summary>
        [ConfigurationKeyName("name")]
        public string Name
        {
            get;
            set;
        }

        /// <summary>
        /// url模板
        /// </summary>
        [ConfigurationKeyName("urlTemplate")]
        public string UrlTemplate
        {
            get;
            set;
        }

        /// <summary>
        /// url模板替换符配置集
        /// </summary>    
        [ConfigurationKeyName("parameters")]
        public Dictionary<string, string> Parameters
        {
            get;
            set;
        } = new();
        /// <summary>
        /// url模板约束配置集
        /// </summary>    
        [ConfigurationKeyName("constraints")]
        public Dictionary<string, string> Constraints
        {
            get;
            set;
        } = new();
        /// <summary>
        /// 
        /// </summary>
        [ConfigurationKeyName("namespaces")]
        public string[] Namespaces
        {
            get;
            set;
        } = new string[0];
    }
}
